package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.view.View;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.store.awk.bean.HorizontalSmallEntranceBean;
import com.huawei.appmarket.service.store.awk.widget.horizon.BaseHorizonCard;
import java.util.List;
import o.azb;
import o.cgz;
import o.chc;

public class HorizontalSmallEntranceCard extends BaseHorizonCard {
    public HorizontalSmallEntranceCard(Context context) {
        super(context);
    }

    public void ˎ() {
        int ˋ = chc.ˋ();
        this.ᐝ.ˋ(ˋ);
        this.ᐝ.ॱ(ˋ);
    }

    public cgz ˏ(View view) {
        super.ˏ(view);
        int ˏॱ = ˏॱ();
        this.ˎ.setPadding(ˏॱ, this.ˎ.getPaddingTop(), ˏॱ, this.ˎ.getPaddingBottom());
        return this;
    }

    protected int ˏॱ() {
        return azb.ˊ(this.ʼॱ) - this.ᐝ.ˊ();
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        List ʻˋ = ((HorizontalSmallEntranceBean) cardBean).ʻˋ();
        if (ʻˋ == null) {
            return;
        }
        if (ʻˋ.size() > ˋॱ()) {
            this.ˎ.setLayoutFrozen(false);
        } else {
            this.ˎ.setLayoutFrozen(true);
        }
    }

    protected int ˋॱ() {
        return chc.ʾ();
    }
}
